Repository navigation
Throw ConfigIncludeDepthError with the limit and both paths when includes exceed depth 10 - #124
Conversation
…eventh include level Both depth checks (file parse and hasconfig URL pre-scan) record the included and including paths in a thread-local C record and set git's 'exceeded maximum include depth (10) while including ... from ...' message; check() and the operation scope's reported failure turn the matching Libgit2Error into the typed error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfd0dfa406
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
An operation scope reports its first swallowed failure at the end, but the thread's include-depth record holds only the newest one. Copy the paths into the scope's failure record when it is recorded, so a hidden submodule's depth failure is still thrown as ConfigIncludeDepthError after later depth failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitFilters registration is process-wide, so the filter=* registration in attributesFromHEAD also ran for a concurrently running suite's checkout and failed its driver expectation there. It now passes other repositories' files through and checks that it ran once for its own. SmudgeProbe owns its driver name and ignores sources for any other driver. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent summaryThe change is ready for review. |
odrobnik
left a comment
There was a problem hiding this comment.
Follow-up review of 65a2c2f. The earlier finding is fixed: a scope's first recorded failure lost its typed include-depth error once a later depth failure replaced the thread-local record. In 1aa59c6, gitkit_config_scope__record copies the include-depth paths into each scope failure at record time, but only when the record's message matches the failure's message. gitkit_config_scope_first_failure_include_depth uses the same iteration as _first_failure, so firstFailure() types the same failure it would otherwise return raw. Allocation failures are cleaned up and mark the failure as lost. __release frees the new strings. The new hiddenIncludeDepthFailureIsTyped test covers this case. The check() path still matches on both the class and the exact message, and that message includes both paths, so a stale thread-local record can't be attached to an unrelated error. The test-isolation changes to the filter and smudge probes only narrow the callbacks to their own sources. CI is green on all platforms. No new issues found.
👍 No findings.
Reviewed by Claude · opus
Resolves #119.
When a config include chain goes past git's 10-level limit, GitKit now throws a dedicated
ConfigIncludeDepthError. It carries the limit, the file being included and the file that includes it, so a host can print git's "exceeded maximum include depth (10) while including … from …" message. This works for plain includes and for conditional includes read while checkinghasconfigremote URLs. Other behaviour is unchanged: a missing target is still empty rather than an error, and a failed update leaves the config untouched. The full test suite passes locally. CI will run on the pull request, and SwiftPorts can drop its known-issue marker once this is released.